let onWatch = (obj, setBind, getLogger) => {
    let handler = {
      get(target, property, receiver) {
        getLogger(target, property)
        return Reflect.get(target, property, receiver)
      },
      set(target, property, value, receiver) {
        setBind(value, property)
        return Reflect.set(target, property, value)
      }
    }
    return new Proxy(obj, handler)
}
  
let a = [1,2,3];
let ap = onWatch(
    a,
    (v, property) => {
        console.log(`监听到属性${property}改变为${v}`)
    },
    (target, property) => {
        console.log(`'${property}' = ${target[property]}`)
    }
)
ap.push(10);
ap[1] = 10;